/** @satisfies {import('@webcontainer/api').FileSystemTree} */

export const files = {
  // This is a directory - provide its name as a key
  file: {
    // Because it's a directory, add the "directory" key
    directory: {
      // Here we will add files
      'index.js': {
        file: {
          contents: `
import express from 'express';
const app = express();
const port = 8000;

app.get('/', (req, res) => {
  res.send('Welcome to a WebContainers app! 🥳');
});

app.listen(port, () => {
  console.log(\`App is live at http://localhost:\${port}\`);
});`,
        },
      },
      'package.json': {
        file: {
          contents: `
{
  "name": "example-app",
  "type": "module",
  "dependencies": {
    "express": "latest",
    "nodemon": "latest"
  },
  "scripts": {
    "start": "nodemon index.js"
  }
}`,
        },
      },
    },
  },


};
